const Router = require('@koa/router');
const {login, add, upload} = require('../controller/user');
const {loginValidator} = require("../middleware/loginValidator");
const {auth} = require("../middleware/auth");

const router = new Router({prefix: '/user'});

router.post('/login', loginValidator, login);
router.post('/add', auth,  add);
router.post('/upload', upload)

module.exports = router;
